package chapter_17_command.classic2;

/**
 * @author yaochenglong
 * @date 2017/10/20
 */
public class ConcreteCommand2 extends AbstractCommand {

    //默认使用ConcreteReceiver2接收者
    public ConcreteCommand2(){
        super(new ConcreteReceiver2());
    }

    //可以选择接收者
    public ConcreteCommand2(Receiver receiver) {
        super(receiver);
    }

    @Override
    public void execute() {
        receiver.doSomething();
    }
}
